<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function () {
	load();
	function load(){
			$.ajax({
				url:"getAllEmployee.action",
				date:{},
				type:"post",
				datatype:"json",
				success:function(data){
					alert(data);
		 			var employee = eval("("+data+")");
		            var str = "";
					console.log(data);
		             for (i=0;i<employee.length;i++) {
		                str += "<tr><td>" + employee[i].name + "</td><td>" + employee[i].phone +
		                "</td><td>" + employee[i].mail + "</td><td>" + employee[i].hiredate +
		                "</td><td>" + employee[i].employeeType.name + 
		                "</td></tr>";
		            } 
		            $("#allemployee").append(str);
				}
			})
		}
})
</script>
</head>
<body>
	<div id="allemployee">
	</div>
</body>
</html>